﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using InventoryPro.DAL;
using InventoryPro.BL;

namespace InventryPro.Customers
{
    public partial class CreateCustomer : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSaveCustomer_Click(object sender, EventArgs e)
        {
            Customer cust = new Customer();
            cust.Address = TxtCustAddress.Text;
            cust.City = TxtCustCity.Text;
            cust.CompanyName = txtcustCompany.Text;           
           
            cust.ContactName = TxtCustContactName.Text;
            cust.ContactTitle = TxtCustcontactTitle.Text;
            cust.Country = TxtCustCountry.Text;
            cust.Fax = TxtCustFaxNumber.Text;
            cust.Phone = TxtCustPhoneNumber.Text;
            cust.PostalCode = TxtCustPostalCode.Text;
            cust.Region = TxtCustRegion.Text;
            cust.CustomerID = txtcustId.Text;
            CustomerLogic customerBL = new CustomerLogic();
            customerBL.CreateCustomer(cust);
            ClearCustomerControl();
            
        }

        private void ClearCustomerControl()
        {
            
        }
    }
}